package com.qfedu.shardingjdbc.controller;

import com.qfedu.shardingjdbc.dao.WorkLogDao;
import com.qfedu.shardingjdbc.entity.WorkLog;
import com.qfedu.shardingjdbc.service.WorkLogService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 千锋Java,为你而生！
 *
 * @Author: Feri
 * @Date:2024/11/29 15:56
 * @Modified:
 */
@RestController
@RequestMapping("/api/wlog")
@Tag(name = "工作日志")
public class WorkLogController {
    @Resource
    private WorkLogService service;

    @PostMapping("add")
    public String add(@RequestBody WorkLog log){
        return service.add(log);
    }

    @GetMapping("all")
    public List<WorkLog> all(){
        return service.queryAll();
    }
}
